package com.pep.mgmt.repo;

import java.util.Optional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;

import com.pep.mgmt.model.entity.RcstIpTablesRule;

import jakarta.transaction.Transactional;

public interface RcstIpTableRuleRepo extends JpaRepository<RcstIpTablesRule, Long> {

    @Transactional
	@Modifying
    void deleteAllByVrfNameAndRcstIpAddr(String vrfName, String rcstIpAddress);

    Optional<RcstIpTablesRule> findByVrfNameAndRcstIpAddr(String vrfName, String rcstIpAddress);

    Long countByVrfNameAndRcstIpAddr(String vrfName, String rcstIpAddr);

}
